//
//  Extension.swift
//  ZSWeibo
//
//  Created by zsj1992 on 16/4/6.
//  Copyright © 2016年 ichange. All rights reserved.
//
//
import UIKit
// MARK: - 这是给UIView做一个扩展



extension UIView {
    @IBInspectable var cornerRadius: CGFloat {
        get {
            return layer.cornerRadius
        }
        set {
            layer.cornerRadius = newValue
            layer.masksToBounds = newValue > 0
        }
    }
    
    @IBInspectable var borderWitdh: CGFloat {
        get {
            return layer.borderWidth
        }
        set {
            layer.borderWidth = newValue

        }
    }
    @IBInspectable var borderColor:UIColor {
        get {
            return UIColor(CGColor: layer.borderColor!)
        }
        set {
            layer.borderColor = newValue.CGColor

        }
    }

    
    
    
    
    
    
    
}